package com.style_transfer.service.impl;

import com.style_transfer.dao.ImageDao;
import com.style_transfer.model.Image;
import com.style_transfer.model.Location;
import com.style_transfer.service.ImageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ImageServiceImpl implements ImageService {
    @Autowired
    private ImageDao imageDao;

    @Override
    public Image getImageByID(int im_id) {
        return imageDao.getImageByID(im_id);
    }

    @Override
    public Image getVideoByID(int im_id) {
        return imageDao.getVideoByID(im_id);
    }

    @Override
    public Image getImage(Location location) {
        return imageDao.getImage(location.getL_id());
    }

    @Override
    public Image getVideo(Location location) {
        return imageDao.getVideo(location.getL_id());
    }

    @Override
    public List<Image> getImageByName(String l_name) {
        return imageDao.getImageByName(l_name);
    }

    @Override
    public List<Image> getAllImage() {
        return imageDao.getAllImage();
    }

    @Override
    public List<Image> getAllVideo() {
        return imageDao.getAllVideo();
    }
}
